package tree;

import java.util.TreeMap;
import java.util.TreeSet;

public class tree01 {
    public static void main(String[] args) {
        TreeMap<Integer, String> tree = new TreeMap<>();
        tree.put(300, "1");
        tree.put(200, "2");
        tree.put(160, "3");
        System.out.println(tree); //排序结果

        TreeSet<Integer> set = new TreeSet<>();
        set.add(67);
        set.add(88);
        set.add(10);
        set.add(23);
        set.add(189);
        set.add(100);
        System.out.println(set);

    }
}
